﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Web.Core;
using Web.Core.Objects;

public partial class AjaxProducts : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int catID = int.Parse(Request["catID"]);
        int page = int.Parse(Request["page"]);
        ArrayList _products = new ArrayList();
        _products = Products.GetAllProductsByCategoryIDVisible((int)Session["Language"], catID, page, 3);
        string str = "";
        foreach (Product item in _products)
        {
            str += "<li><span style='font-weight: bold;'>" + item.Name;
            str += "</span><div class='vmProductSnapshot'><a href='#' title='" + item.Name + "'>";
            str += "<img border='0' alt='" + item.Name + "' src='images/products/" + item.Image + "' style='width: 110px; height: 140px;'>";
            str += "</a> </div><span class='productPrice'>"+item.Price+" </span> <br></li>";
        }

        Response.Write(str);
        Response.End();
    }

}
